package com.phrp.controller;

import com.phrp.entity.vo.ReportSearchDataVO;
import com.phrp.entity.vo.ReportSubmitDataVO;
import com.phrp.service.ReportRecordService;
import com.phrp.util.returnResult.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ssc
 * @since 2024-05-03
 */
@RestController
@RequestMapping("/report")
public class ReportRecordController {

    @Autowired
    private ReportRecordService reportRecordService;

    /**
     * 条件搜索数据
     * @param searchData
     * @return
     */
    @PostMapping(value = "searchReportData")
    public ResponseResult searchReportData(@RequestBody ReportSearchDataVO searchData){
        return reportRecordService.searchReportData(searchData);
    }

    /**
     * 上报审核结果
     * @param report
     * @return
     */
    @PostMapping(value = "submitAudit")
    public ResponseResult submitAudit(@RequestBody ReportSubmitDataVO report){
        return reportRecordService.submitAudit(report);
    }
}
